﻿using System;
using System.Collections.Generic;

namespace Meqs.Entity
{
    /// <summary>
    /// 班级信息
    /// </summary>
    [Serializable]
    public class ClsInfo
    {
        public ClsInfo()
        {
            m_RID = 0;
            m_Grade = 0;
            m_ClsNo = 0;
            m_ClsName = null;
            m_SchoolMark = null;

        }

        public ClsInfo(int mRid, int mGrade, int mClsNo, string mClsName, int mDivSub, int mHeaderID, int mLevels, bool? mISEffect, string mSchoolMark)
        {
            m_RID = mRid;
            m_Grade = mGrade;
            m_ClsNo = mClsNo;
            m_ClsName = mClsName;
            m_DivSub = mDivSub;
            m_HeaderID = mHeaderID;
            m_Levels = mLevels;
            m_IsEffect = mISEffect;
            m_SchoolMark = mSchoolMark;
        }


        #region RID

        private int m_RID;
        public int RID
        {
            get { return m_RID; }
            set { m_RID = value; }
        }

        #endregion

        #region Grade

        private int m_Grade;

        public int Grade
        {
            get { return m_Grade; }
            set { m_Grade = value; }
        }

        #endregion

        #region ClsNo

        private int m_ClsNo;

        public int ClsNo
        {
            get { return m_ClsNo; }
            set { m_ClsNo = value; }
        }

        #endregion

        #region ClsName

        private string m_ClsName;

        public string ClsName
        {
            get { return m_ClsName; }
            set { m_ClsName = value; }
        }

        #endregion

        #region DivSub

        private int m_DivSub;

        public int DivSub
        {
            get { return m_DivSub; }
            set { m_DivSub = value; }
        }

        #endregion

        #region HeaderID

        private int m_HeaderID;

        public int HeaderID
        {
            get { return m_HeaderID; }
            set { m_HeaderID = value; }
        }
        #endregion

        #region Levels

        private int m_Levels;

        public int Levels
        {
            get { return m_Levels; }
            set { m_Levels = value; }
        }

        #endregion

        #region IsEffect

        private bool? m_IsEffect;

        public bool? IsEffect
        {
            get { return m_IsEffect; }
            set { m_IsEffect = value; }
        }

        #endregion

        #region SchoolMark

        private string m_SchoolMark;

        public string SchoolMark
        {
            get { return m_SchoolMark; }
            set { m_SchoolMark = value; }
        }

        #endregion

        #region Rewrite Equals and HashCode

        /// <summary>
        /// 
        /// </summary>
        public override bool Equals(object obj)
        {
            if (this == obj) return true;
            if ((obj == null) || (obj.GetType() != GetType())) return false;
            ClsInfo castObj = (ClsInfo)obj;
            return (castObj != null)
 && m_RID == castObj.RID;
        }

        /// <summary>
        /// 用唯一值实现GetHashCode
        /// </summary>
        public override int GetHashCode()
        {
            int hash = 64;
            hash = hash * 64
 * m_RID.GetHashCode(); return hash;
        }

        #endregion
    }

    [Serializable]
    public class VClsInfo
    {
        public VClsInfo()
        {
            m_RID = 0;
            m_ClsNo = 0;
            m_Levels = null;
            m_ClsGradeName = null;
        }

        #region RID

        private int m_RID;
        public int RID
        {
            get { return m_RID; }
            set { m_RID = value; }
        }

        #endregion

        #region ClsNo

        private int m_ClsNo;

        public int ClsNo
        {
            get { return m_ClsNo; }
            set { m_ClsNo = value; }
        }

        #endregion

        #region ClsGradeName

        private string m_ClsGradeName;

        public string ClsGradeName
        {
            get { return m_ClsGradeName; }
            set { m_ClsGradeName = value; }
        }

        #endregion

        #region Levels

        private string m_Levels;

        public string Levels
        {
            get { return m_Levels; }
            set { m_Levels = value; }
        }

        #endregion

        #region DivSub

        private string m_divSub;

        public string DivSub
        {
            get { return m_divSub; }
            set { m_divSub = value; }
        }

        #endregion

        #region Header

        private string m_header;

        public string Header
        {
            get { return m_header; }
            set { m_header = value; }
        }

        #endregion

    };

    [Serializable]
    public class VClasssInfo : ClsInfo
    {
        public VClasssInfo()
        {

        }

        #region SchoolYear

        private int m_schoolYear;
        public int SchoolYear
        {
            get { return m_schoolYear; }
            set { m_schoolYear = value; }
        }

        #endregion

        

    };
}